(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/index/index" ], {
    "15e8": function(e, t, a) {
        a.r(t);
        var n, i = a("f368"), o = a.n(i);
        for (n in i) "default" !== n && function(e) {
            a.d(t, e, function() {
                return i[e];
            });
        }(n);
        t.default = o.a;
    },
    "2ac5": function(e, t, a) {
        a.d(t, "b", function() {
            return i;
        }), a.d(t, "c", function() {
            return o;
        }), a.d(t, "a", function() {
            return n;
        });
        var n = {
            uNavbar: function() {
                return a.e("uview-ui/components/u-navbar/u-navbar").then(a.bind(null, "dffe"));
            },
            uSearch: function() {
                return a.e("uview-ui/components/u-search/u-search").then(a.bind(null, "6bb4"));
            },
            addMiniTip: function() {
                return Promise.all([ a.e("common/vendor"), a.e("components/add-mini-tip/add-mini-tip") ]).then(a.bind(null, "00a6"));
            },
            uImage: function() {
                return a.e("uview-ui/components/u-image/u-image").then(a.bind(null, "871d"));
            },
            uLoading: function() {
                return a.e("uview-ui/components/u-loading/u-loading").then(a.bind(null, "54b5"));
            },
            uIcon: function() {
                return a.e("uview-ui/components/u-icon/u-icon").then(a.bind(null, "bee6"));
            },
            uGap: function() {
                return a.e("uview-ui/components/u-gap/u-gap").then(a.bind(null, "130d"));
            },
            uEmpty: function() {
                return a.e("uview-ui/components/u-empty/u-empty").then(a.bind(null, "b399"));
            },
            uButton: function() {
                return a.e("uview-ui/components/u-button/u-button").then(a.bind(null, "cad8"));
            },
            uLoadmore: function() {
                return a.e("uview-ui/components/u-loadmore/u-loadmore").then(a.bind(null, "2220"));
            },
            uBackTop: function() {
                return a.e("uview-ui/components/u-back-top/u-back-top").then(a.bind(null, "feb3"));
            },
            sjTabBar: function() {
                return a.e("components/sj-tab-bar/sj-tab-bar").then(a.bind(null, "1ba9"));
            }
        }, i = function() {
            this.$createElement;
            this._self._c;
        }, o = [];
    },
    "44f2": function(e, t, a) {},
    "4d92": function(e, t, a) {
        var n = a("44f2");
        a.n(n).a;
    },
    b628: function(e, t, a) {
        (function(e) {
            function t(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            a("0cda"), t(a("66fd")), e(t(a("b7bc")).default);
        }).call(this, a("543d").createPage);
    },
    b7bc: function(e, t, a) {
        a.r(t);
        var n, i = a("2ac5"), o = a("15e8");
        for (n in o) "default" !== n && function(e) {
            a.d(t, e, function() {
                return o[e];
            });
        }(n);
        a("4d92");
        var r = a("f0c5"), i = Object(r.a)(o.default, i.b, i.c, !1, null, null, null, !1, i.a, void 0);
        t.default = i.exports;
    },
    f368: function(e, i, l) {
        (function(r) {
            Object.defineProperty(i, "__esModule", {
                value: !0
            }), i.default = void 0;
            var e, o = (e = l("a34a")) && e.__esModule ? e : {
                default: e
            };
            function c(e, t, a, n, i, o, r) {
                try {
                    var d = e[o](r), c = d.value;
                } catch (e) {
                    return a(e), 0;
                }
                d.done ? t(c) : Promise.resolve(c).then(n, i);
            }
            function a(d) {
                return function() {
                    var e = this, r = arguments;
                    return new Promise(function(t, a) {
                        var n = d.apply(e, r);
                        function i(e) {
                            c(n, t, a, i, o, "next", e);
                        }
                        function o(e) {
                            c(n, t, a, i, o, "throw", e);
                        }
                        i(void 0);
                    });
                };
            }
            var d = null, s = getApp(), n = {
                data: function() {
                    return {
                        warn_num: r.getStorageSync("userinfo").s_1_num,
                        module_name: s.globalData.module_name,
                        sharetitle: "",
                        waimaidaohangcurrent: 0,
                        waimaidaohang_1: [],
                        waimaidaohang_2: [],
                        waimaidaohang_3: [],
                        waimaidaohang_4: [],
                        waimaittnew_daohang_height: 0,
                        sharepic: "",
                        appid_type: 0,
                        movietype: 1,
                        moviecometype: 1,
                        movielist: [],
                        moviecomelist: [],
                        movie_hotshuliang: 0,
                        qudao_tkl: "",
                        is_qudao_tkl: 0,
                        showAlert_taobaoauth: !1,
                        showAlert_login: !1,
                        elm_url: [],
                        meituan_url: [],
                        wxCode: "",
                        userinfo: [],
                        swiperItems: [],
                        waimaidaohang: [],
                        waimailist: [],
                        setting: [],
                        showAlert_meituan: !1,
                        kwd: "",
                        showAlert: !1,
                        currentCateIndex: 0,
                        leftTo: "cate1",
                        productListTo: "",
                        mainCate: [],
                        allProducts: [],
                        allProducts_temp: [],
                        mainHeight: 500,
                        scrollTimer: null,
                        contact_title: "",
                        contact_title_text: "",
                        contact_title_desc: "",
                        contact_id: "",
                        contact_type: "",
                        contact_thumb: "",
                        youlikes: [],
                        indexCateAndProducts: [],
                        top: 0,
                        footerCurrent: 0,
                        showToast_login: !1,
                        pageKey: 0,
                        height: "",
                        tabBar: [],
                        elmwm_act_id: 0,
                        mtpic: 0,
                        cityid: 40,
                        cityCode: 500100,
                        lat: 0,
                        lon: 0,
                        navItems: [],
                        navIndex: 0,
                        navType: "",
                        mallpage: 1,
                        mallpagesize: 20,
                        mallgoodslist: [],
                        loadStatus: "loadmore",
                        loadText: {
                            loadmore: "上拉加载更多",
                            loading: "努力加载中",
                            nomore: "实在没有了"
                        },
                        scrollTop: 0,
                        windowHeight: r.getStorageSync("windowHeight"),
                        navQuery: "",
                        index_header_background: "",
                        search_width: 0,
                        isFixed: !1,
                        headerHeight: 0,
                        nav_margin_top: "15rpx",
                        nav_padding_top: "0rpx",
                        search_height: "",
                        keyword: "",
                        search_placeholder: "",
                        fixed_heiht: 0,
                        mall_nav: [],
                        api_url: 0,
                        ad_banner: [],
                        ad_banner_list: [],
                        ad_banner_list2: [],
                        current_bannerid: 0,
                        banner_color: "",
                        swiper_color: "",
                        appid: "",
                        path: "",
                        search_id: "",
                        uid: 0,
                        autoplay: !0
                    };
                },
                components: {
                    gracePage: function() {
                        l.e("graceUI/components/gracePage").then(function() {
                            return resolve(l("1021"));
                        }.bind(null, l)).catch(l.oe);
                    },
                    graceSwiper: function() {
                        l.e("graceUI/components/graceSwiper").then(function() {
                            return resolve(l("9fc3"));
                        }.bind(null, l)).catch(l.oe);
                    },
                    addMiniTip: function() {
                        Promise.all([ l.e("common/vendor"), l.e("components/add-mini-tip/add-mini-tip") ]).then(function() {
                            return resolve(l("00a6"));
                        }.bind(null, l)).catch(l.oe);
                    },
                    graceDialog: function() {
                        l.e("graceUI/components/graceDialog").then(function() {
                            return resolve(l("f85d"));
                        }.bind(null, l)).catch(l.oe);
                    },
                    graceImg: function() {
                        l.e("graceUI/components/graceImg").then(function() {
                            return resolve(l("1d6e"));
                        }.bind(null, l)).catch(l.oe);
                    },
                    graceNavBar: function() {
                        l.e("graceUI/components/graceNavBar2").then(function() {
                            return resolve(l("e74d"));
                        }.bind(null, l)).catch(l.oe);
                    },
                    graceSearch: function() {
                        l.e("graceUI/components/graceSearch").then(function() {
                            return resolve(l("de21"));
                        }.bind(null, l)).catch(l.oe);
                    }
                },
                props: {},
                onReady: function() {
                    var t = this;
                    return a(o.default.mark(function e() {
                        return o.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                return e.next = 2, t.$onLaunched;

                              case 2:
                                t.autoUpdate();

                              case 3:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }))();
                },
                onHide: function() {
                    this.autoplay = !1;
                },
                onReachBottom: function() {
                    "nomore" != this.loadStatus && this.loadMallgoodslist();
                },
                onShow: function(e) {
                    var n = this;
                    return a(o.default.mark(function e() {
                        var t, a;
                        return o.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                return e.next = 2, n.$onLaunched;

                              case 2:
                                if (n.autoplay = !0, "undefined" != n.tabBar.list) for (t = 0; t < n.tabBar.list.length; t++) -1 != n.tabBar.list[t].url.indexOf("index/index") && (n.pageKey = t);
                                r.getStorageSync("openid") && (a = s.globalData.util.url("entry/wxapp/api", {
                                    m: s.globalData.module_name,
                                    o: "chkpid"
                                }), r.request({
                                    url: a,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: {
                                        openid: r.getStorageSync("openid")
                                    },
                                    success: function(e) {
                                        e = s.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), e = JSON.parse(e);
                                        r.setStorageSync("pid_use_time", e), r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && (r.setStorageSync("elmwm_url", ""), 
                                        r.setStorageSync("elmsc_url", ""), r.setStorageSync("elmwmposter", ""), r.setStorageSync("elmscposter", ""), 
                                        r.setStorageSync("pid_time", r.getStorageSync("pid_use_time")));
                                    }
                                }), a = s.globalData.util.url("entry/wxapp/api", {
                                    m: s.globalData.module_name,
                                    o: "subscribemessage"
                                }), r.request({
                                    url: a,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: {
                                        openid: r.getStorageSync("openid"),
                                        type: 2
                                    },
                                    success: function(e) {
                                        r.setStorageSync("warn_daynum", e.data.warm_daynum);
                                    }
                                })), r.hideLoading(), d && d.show().catch(function(e) {
                                    console.error(e);
                                }), n.windowHeight = r.getStorageSync("windowHeight");

                              case 10:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }))();
                },
                onPullDownRefresh: function() {
                    this.loadWaimaiindex(), this.loadmovielist(), this.loadmoviecomelist(), this.load_goods();
                },
                onPageScroll: function(t) {
                    var a = this;
                    0 == this.headerHeight && r.createSelectorQuery().select("#navheader").fields({
                        size: !0
                    }, function(e) {
                        e && (a.headerHeight = e.height);
                    }).exec(), this.scrollTop = t.scrollTop, r.createSelectorQuery().select("#scroll").boundingClientRect(function(e) {
                        e && (a.fixed_heiht = e.height);
                    }).exec(), 100 < this.headerHeight && t.scrollTop >= this.headerHeight ? (this.isFixed = !0, 
                    this.autoplay = !1, this.nav_margin_top = r.getStorageSync("headerHeight") + "px", 
                    this.nav_padding_top = "15rpx") : (this.isFixed = !1, this.nav_margin_top = "15rpx", 
                    this.nav_padding_top = "0rpx"), r.createSelectorQuery().select("#hover").boundingClientRect(function(e) {
                        t.scrollTop + 44 > e.height + r.upx2px(a.setting.waimaittnew_lunbo_height) ? a.autoplay = !1 : a.autoplay = !0;
                    }).exec();
                },
                onLoad: function(n) {
                    var i = this;
                    return a(o.default.mark(function e() {
                        var t, a;
                        return o.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                return e.next = 2, i.$onLaunched;

                              case 2:
                                (t = i).setting = r.getStorageSync("setting"), t.tabBar = r.getStorageSync("tabbar"), 
                                t.userinfo = r.getStorageSync("userinfo"), t.navItems = r.getStorageSync("setting").index_malltype, 
                                t.navType = r.getStorageSync("setting").index_malltype[0].type, t.navQuery = r.getStorageSync("setting").index_malltype[0].query, 
                                t.search_placeholder = t.setting.index_search_placeholder || "搜索商品标题，先领券再购买", t.search_width = r.upx2px(540) + "px", 
                                (a = r.getMenuButtonBoundingClientRect()) && (t.search_width = a.left - r.upx2px(40) + "px"), 
                                t.search_height = 750 / r.getStorageSync("windowWidth") * a.height, t.index_header_background = {
                                    backgroundColor: t.setting.waimaittnew_lunbobgcolor
                                }, t.swiper_color = t.setting.waimaittnew_lunbobgcolor, a = n, t.loadWaimaiindex(), 
                                t.loadmovielist(), t.loadmoviecomelist(), t.loadMallgoodslist(), t.load_goods(), 
                                r.getStorageSync("setting").ad_index_cp_id && wx.createInterstitialAd && ((d = wx.createInterstitialAd({
                                    adUnitId: r.getStorageSync("setting").ad_index_cp_id
                                })).onLoad(function() {}), d.onError(function(e) {
                                    console.log("onError event emit", e);
                                }), d.onClose(function() {}), d && d.show().catch(function(e) {
                                    console.log("onError event emit", e);
                                })), r.setNavigationBarTitle({
                                    title: t.setting.waimaittnew_navigationBarTitleText
                                }), r.setNavigationBarColor({
                                    backgroundColor: t.setting.waimaittnew_navigationBarBackgroundColor,
                                    frontColor: t.setting.waimaittnew_navigationBarTextStyle
                                }), r.getStorageSync("userinfo").s_1_num ? t.warn_num = r.getStorageSync("userinfo").s_1_num : t.warn_num = 0, 
                                r.hideLoading(), a.to && ("meituan" == a.to ? wx.navigateTo({
                                    url: "../../pagesA/pages/meituan/index"
                                }) : "elm" == a.to ? wx.navigateTo({
                                    url: "../../pagesA/pages/elm/index"
                                }) : "user" == a.to ? wx.navigateTo({
                                    url: "../user/index"
                                }) : "eatwhat" == a.to ? r.navigateTo({
                                    url: "../../pagesA/pages/eat/index"
                                }) : "ranking" == a.to ? r.navigateTo({
                                    url: "../../pagesA/pages/userA/ranking"
                                }) : "account" == a.to ? r.navigateTo({
                                    url: "../../pagesA/pages/userA/account"
                                }) : "page" == a.to && r.navigateTo({
                                    url: "../index/page?page_id=" + a.page_id
                                }));

                              case 29:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }))();
                },
                onShareAppMessage: function() {
                    var e = "pages/index/index?uid=" + r.getStorageSync("userinfo").user_id;
                    return {
                        title: this.sharetitle,
                        imageUrl: this.sharepic,
                        path: e
                    };
                },
                methods: {
                    swiperchange: function(e) {
                        this.swiper_color = this.swiperItems[e].banner_color, this.index_header_background = {
                            backgroundColor: this.swiperItems[e].banner_color
                        }, r.setNavigationBarColor({
                            backgroundColor: this.swiperItems[e].banner_color,
                            frontColor: "#ffffff"
                        });
                    },
                    change_banner: function(e) {
                        this.current_bannerid = e, this.banner_color = this.ad_banner[e].banner_color;
                    },
                    search_blur: function() {
                        this.search_placeholder = this.setting.index_search_placeholder || "搜索商品标题，先领券再购买";
                    },
                    search_focus: function() {
                        this.search_placeholder = "";
                    },
                    toSearch: function(e) {
                        this.keyword = e, this.onSearch();
                    },
                    onSearch: function() {
                        "" != this.keyword.trim() ? this.getList("refresh", !0) : t.showToast({
                            title: "搜索内容不能为空",
                            duration: 2e3,
                            icon: "none"
                        });
                    },
                    tosearch: function(e) {
                        "" == this.keyword.trim() ? r.showToast({
                            title: "搜索内容不能为空",
                            duration: 2e3,
                            icon: "none"
                        }) : r.navigateTo({
                            url: "../../pagesA/pages/mallA/searchlist?keyword=" + e.trim()
                        });
                    },
                    clear: function() {
                        this.keyword = "";
                    },
                    openGoods: function(e) {
                        "youxuan" == e.currentTarget.dataset.pingtai ? r.navigateToMiniProgram({
                            appId: e.currentTarget.dataset.appid,
                            path: e.currentTarget.dataset.path
                        }) : "group" == e.currentTarget.dataset.pingtai ? r.navigateTo({
                            url: "../meituangroup/detail?id=".concat(e.currentTarget.dataset.shopid, "&cat0_id=").concat(e.currentTarget.dataset.cat0_id, "&lng=").concat(r.getStorageSync("lon"), "&lat=").concat(r.getStorageSync("lat"), "&cityid=").concat(e.currentTarget.dataset.city_id)
                        }) : r.navigateTo({
                            url: "../../pagesA/pages/mallA/detail?pt=" + e.currentTarget.dataset.pingtai + "&goodsid=" + e.currentTarget.dataset.goodsid + "&goodssign=" + e.currentTarget.dataset.goodssign + "&search_id=" + e.currentTarget.dataset.search_id
                        });
                    },
                    navChange: function(e) {
                        var t = this;
                        r.createSelectorQuery().select("#scroll").boundingClientRect(function(e) {
                            e && (t.fixed_heiht = e.height);
                        }).exec(), 100 < this.headerHeight && t.scrollTop >= this.headerHeight ? (this.isFixed = !0, 
                        this.autoplay = !1, this.nav_margin_top = r.getStorageSync("headerHeight") + "px", 
                        this.nav_padding_top = "15rpx") : (this.isFixed = !1, this.autoplay = !0, this.nav_margin_top = "15rpx", 
                        this.nav_padding_top = "0rpx");
                        r.showLoading({
                            title: "加载中...",
                            mask: !1
                        }), this.scrollTop >= this.headerHeight && r.pageScrollTo({
                            scrollTop: this.headerHeight,
                            duration: 0
                        }), this.navIndex = e, this.navType = this.navItems[e].type, this.navQuery = this.navItems[e].query, 
                        this.mallpage = 1, this.loadStatus = "loadmore", "youxuan" == this.navItems[e].type && r.getStorageSync("lon") && r.getStorageSync("lat") || "youxuan" != this.navItems[e].type ? this.loadMallgoodslist() : this.getLocation();
                    },
                    change: function(e) {
                        var t = this, a = this.tabBar.list[e];
                        if (this.pageKey = e, r.setStorageSync("pageKey", e), 1 == a.adtype) {
                            if (1 == a.appid_type && r.getStorageSync("mtwm_url")) return void r.navigateToMiniProgram({
                                appId: "wxde8ac0a21135c07d",
                                path: r.getStorageSync("mtwm_url")
                            });
                            if (1 == a.appid_type && !r.getStorageSync("mtwm_url")) return t.appid_type = 1, 
                            void t.meituan_urlFun();
                            if (2 == a.appid_type && r.getStorageSync("mtsc_url")) return void r.navigateToMiniProgram({
                                appId: "wxde8ac0a21135c07d",
                                path: r.getStorageSync("mtsc_url")
                            });
                            if (2 == a.appid_type && !r.getStorageSync("mtsc_url")) return t.appid_type = 2, 
                            void t.meituan_urlFun();
                            if (3 == a.appid_type && r.getStorageSync("elmwm_url")) return r.navigateToMiniProgram({
                                appId: "wxece3a9a4c82f58c9",
                                path: r.getStorageSync("elmwm_url")
                            }), t.updatepid(), void console.log(r.getStorageSync("elmwm_url"));
                            if (3 == a.appid_type && !r.getStorageSync("elmwm_url")) return t.appid_type = 3, 
                            void t.gettaobaoauth();
                            if (4 == a.appid_type && r.getStorageSync("elmsc_url")) return r.navigateToMiniProgram({
                                appId: "wxece3a9a4c82f58c9",
                                path: r.getStorageSync("elmsc_url")
                            }), t.updatepid(), void console.log(r.getStorageSync("elmsc_url"));
                            if (4 == a.appid_type && !r.getStorageSync("elmsc_url")) return console.log("ccc"), 
                            t.appid_type = 4, void t.gettaobaoauth();
                            if (0 == a.appid_type) return void r.navigateToMiniProgram({
                                appId: a.appid,
                                path: a.path
                            });
                        }
                        if (5 != a.adtype) if (4 != a.adtype) 2 != a.adtype && 3 != a.adtype || (t = s.globalData.util.url("entry/wxapp/api", {
                            m: s.globalData.module_name,
                            o: "ad_kefubind"
                        }), r.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                adtype: "ad",
                                adid: a.item_id,
                                openid: r.getStorageSync("openid")
                            },
                            success: function(e) {}
                        }), this.contact_title_desc = "", this.contact_type = "ad", this.contact_id = a.item_id, 
                        this.contact_title = a.title, this.contact_title_text = a.title_text, this.contact_title_desc = a.title_desc, 
                        this.contact_thumb = r.getStorageSync("setting").dianwo, this.showDialog3()); else {
                            r.setStorageSync("index_nav", a.url);
                            var n = getCurrentPages();
                            n.reverse();
                            for (var i = a.url.replace("../", ""), o = 0; o < n.length; o++) if (-1 != n[o].route.indexOf(i)) return void r.navigateBack({
                                delta: o
                            });
                            if (-1 == a.url.indexOf("../index/index")) {
                                if (-1 == a.url.indexOf("../index/") && -1 == a.url.indexOf("../meituangroup/") && -1 == a.url.indexOf("../user/") && -1 == a.url.indexOf("../movie/") && -1 == a.url.indexOf("../shop/") && -1 == a.url.indexOf("../kefu/") && -1 == a.url.indexOf("../elm/") && -1 == a.url.indexOf("../meituan/") && -1 == a.url.indexOf("../mall/")) return -1 != a.url.indexOf("../../../pages/index/") || -1 != a.url.indexOf("../../../pages/user/") || -1 != a.url.indexOf("../../../pages/kefu/") ? (i = a.url.replace("../../../pages/", "../"), 
                                void r.navigateTo({
                                    url: i
                                })) : -1 != a.url.indexOf("../../../pages/meituan/") || -1 != a.url.indexOf("../../../pages/elm/") || -1 != a.url.indexOf("../../../pages/eat/") ? (i = a.url.replace("../../../pages/", "../../pagesA/pages/"), 
                                void r.navigateTo({
                                    url: i
                                })) : -1 != a.url.indexOf("../../pagesA/pages/movie/") || -1 != a.url.indexOf("../../pagesA/pages/shop/") || -1 != a.url.indexOf("../../pagesA/pages/mallA/mallindex") ? (i = a.url.replace("../../pagesA/pages/", "../"), 
                                void r.navigateTo({
                                    url: i
                                })) : -1 == a.url.indexOf("../../pagesA/pages/movieA/") && -1 == a.url.indexOf("../../pagesA/pages/shopA/") && -1 == a.url.indexOf("../../pagesA/pages/meituan/") && -1 == a.url.indexOf("../../pagesA/pages/elm/") && -1 == a.url.indexOf("../../pagesA/pages/eat/") && -1 == a.url.indexOf("../../pagesA/pages/userA/") && (-1 != a.url.indexOf("../meituan/") || -1 != a.url.indexOf("../elm/") || -1 != a.url.indexOf("../eat/")) ? (i = a.url.replace("../", "../../pagesA/pages/"), 
                                void r.navigateTo({
                                    url: i
                                })) : void r.navigateTo({
                                    url: a.url
                                });
                                r.navigateTo({
                                    url: a.url
                                });
                            }
                        } else r.navigateTo({
                            url: "../kefu/webview?return_url=" + encodeURIComponent(a.url) + "&t=" + Date.parse(new Date())
                        });
                    },
                    fatherHeight: function(e) {
                        this.height = e;
                    },
                    waimaidaohangchange: function(e) {
                        this.waimaidaohangcurrent = e.detail.current;
                    },
                    eat: function() {
                        r.navigateTo({
                            url: "../../pagesA/pages/eat/index"
                        });
                    },
                    showDialog1: function() {
                        this.$refs.showAlert_taobaoauth.open();
                    },
                    closeDialog1: function() {
                        this.$refs.showAlert_taobaoauth.hide();
                    },
                    showDialog2: function() {
                        this.$refs.showAlert_login.open();
                    },
                    closeDialog2: function() {
                        this.$refs.showAlert_login.hide();
                    },
                    showDialog3: function() {
                        this.$refs.showAlert.open();
                    },
                    closeDialog3: function() {
                        this.$refs.showAlert.hide();
                    },
                    userlogin: function() {
                        !r.getStorageSync("userinfo").nickname && 1 == r.getStorageSync("setting").login_type && wx.getUserProfile ? this.showDialog2() : this.closeDialog2();
                    },
                    checksubmessage: function(e) {
                        var a;
                        r.getStorageSync("userinfo").nickname || 1 != r.getStorageSync("setting").login_type || !wx.getUserProfile ? (a = this, 
                        wx.requestSubscribeMessage({
                            tmplIds: r.getStorageSync("setting").warn_tplid,
                            success: function(e) {
                                console.log(e), "reject" == e[r.getStorageSync("setting").warn_yhq_tplid] ? wx.showToast({
                                    title: "您拒绝了订阅消息",
                                    duration: 1e3,
                                    success: function(e) {}
                                }) : wx.showToast({
                                    title: "订阅成功",
                                    duration: 1e3,
                                    success: function(e) {
                                        var t = s.globalData.util.url("entry/wxapp/api", {
                                            m: s.globalData.module_name,
                                            o: "subscribemessage"
                                        });
                                        r.request({
                                            url: t,
                                            method: "POST",
                                            header: {
                                                "content-type": "application/x-www-form-urlencoded"
                                            },
                                            data: {
                                                openid: r.getStorageSync("openid"),
                                                type: 1
                                            },
                                            success: function(e) {
                                                var t = a.userinfo;
                                                a.warn_num++, t.s_1_num++, a.userinfo = t, r.setStorageSync("warn_daynum", e.data.warm_daynum);
                                            }
                                        });
                                    }
                                });
                            },
                            fail: function(e) {}
                        })) : this.showDialog2();
                    },
                    getWxCode: function() {
                        var t = this;
                        wx.login({
                            success: function(e) {
                                t.wxCode = e.code;
                            }
                        });
                    },
                    updatepid: function() {
                        var e = s.globalData.util.url("entry/wxapp/api", {
                            m: s.globalData.module_name,
                            o: "updatepid"
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid")
                            },
                            success: function(e) {}
                        });
                    },
                    login: function(t) {
                        var a = this;
                        this.closeDialog2(), r.getSetting({
                            success: function(e) {
                                e.authSetting["scope.userInfo"] ? r.getUserInfo({
                                    success: function(e) {
                                        a.userAuth(t, e.userInfo, "login");
                                    }
                                }) : a.userAuth(t, null, "login");
                            }
                        });
                    },
                    getUserProfile: function() {
                        var a = this;
                        wx.getUserProfile({
                            desc: "请完善会员资料",
                            success: function(e) {
                                console.log(e.userInfo);
                                var t = s.globalData.util.url("entry/wxapp/userinfo2", {
                                    m: s.globalData.module_name
                                }), e = {
                                    avatarUrl: e.userInfo.avatarUrl,
                                    nickName: e.userInfo.nickName,
                                    openid: r.getStorageSync("openid")
                                };
                                r.request({
                                    url: t,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: e,
                                    success: function(e) {
                                        1 == e.data.status && (r.setStorageSync("userinfo", e.data.data.userinfo), a.userinfo = e.data.data.userinfo, 
                                        a.closeDialog2(), r.showToast({
                                            title: "登录成功",
                                            icon: "none"
                                        }));
                                    }
                                });
                            }
                        });
                    },
                    userAuth: function(a, e, n) {
                        var i = this;
                        "getUserInfo:ok" == a.detail.errMsg && wx.login({
                            success: function(e) {
                                var t = s.globalData.util.url("entry/wxapp/api", {
                                    m: s.globalData.module_name,
                                    o: "userinfo"
                                }), e = {
                                    code: e.code,
                                    encryptedData: a.detail.encryptedData,
                                    iv: a.detail.iv,
                                    openid: r.getStorageSync("openid"),
                                    invite_uid: wx.getStorageSync("invite_uid")
                                };
                                r.request({
                                    url: t,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: e,
                                    success: function(e) {
                                        var t;
                                        1 == ret.data.status && (t = s.globalData.crypt.Decrypt(ret.data.data.data, ret.data.data.key), 
                                        t = JSON.parse(t), r.setStorageSync("userinfo", t.userinfo), i.userinfo = t.userinfo, 
                                        "login" == n && (i.closeDialog2(), r.showToast({
                                            title: "登录成功",
                                            icon: "none"
                                        })));
                                    }
                                });
                            }
                        });
                    },
                    closeAlert: function() {
                        this.closeDialog2();
                    },
                    meituan_urlFun: function() {
                        r.showLoading({
                            title: "加载中...",
                            mask: !1
                        });
                        var t = this;
                        if (1 == t.appid_type && r.getStorageSync("mtwm_url")) return r.navigateToMiniProgram({
                            appId: "wxde8ac0a21135c07d",
                            path: r.getStorageSync("mtwm_url")
                        }), void r.hideLoading();
                        if (2 == t.appid_type && r.getStorageSync("mtsc_url")) return r.navigateToMiniProgram({
                            appId: "wxde8ac0a21135c07d",
                            path: r.getStorageSync("mtsc_url")
                        }), void r.hideLoading();
                        var e = s.globalData.util.url("entry/wxapp/api", {
                            m: s.globalData.module_name,
                            o: "qrcode_mtelm"
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                appid_type: t.appid_type
                            },
                            success: function(e) {
                                e = s.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), e = JSON.parse(e);
                                console.log("qrcode_mtelm:" + e), 1 == t.appid_type && (r.setStorageSync("mtwm_url", e.mtwm_url), 
                                r.setStorageSync("mtwm_h5", e.mtwm_h5), r.setStorageSync("mtwmqrcode2", e.mtwm_qrcode), 
                                1 == t.mtpic ? r.previewImage({
                                    urls: [ r.getStorageSync("mtwmqrcode2") ]
                                }) : r.navigateToMiniProgram({
                                    appId: "wxde8ac0a21135c07d",
                                    path: e.mtwm_url
                                }), r.hideLoading()), 2 == t.appid_type && (r.setStorageSync("mtsc_url", e.mtsc_url), 
                                r.setStorageSync("mtsc_h5", e.mtsc_h5), r.setStorageSync("mtscqrcode2", e.mtsc_qrcode), 
                                1 == t.mtpic ? r.previewImage({
                                    urls: [ r.getStorageSync("mtscqrcode2") ]
                                }) : r.navigateToMiniProgram({
                                    appId: "wxde8ac0a21135c07d",
                                    path: e.mtsc_url
                                }), r.hideLoading()), r.hideLoading();
                            }
                        });
                    },
                    meituanfenxiao_urlFun: function() {
                        r.showLoading({
                            title: "加载中...",
                            mask: !1
                        });
                        var t = this;
                        if (5 == t.appid_type && r.getStorageSync("mtfxtuan_url")) return r.navigateToMiniProgram({
                            appId: "wxde8ac0a21135c07d",
                            path: r.getStorageSync("mtfxtuan_url")
                        }), void r.hideLoading();
                        if (6 == t.appid_type && r.getStorageSync("mtfxwm_url")) return r.navigateToMiniProgram({
                            appId: "wxde8ac0a21135c07d",
                            path: r.getStorageSync("mtfxwm_url")
                        }), void r.hideLoading();
                        if (7 == t.appid_type && r.getStorageSync("mtfxsc_url")) return r.navigateToMiniProgram({
                            appId: "wxde8ac0a21135c07d",
                            path: r.getStorageSync("mtfxsc_url")
                        }), void r.hideLoading();
                        var e = s.globalData.util.url("entry/wxapp/meituangroup_url", {
                            m: s.globalData.module_name
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                appid_type: t.appid_type
                            },
                            success: function(e) {
                                5 == t.appid_type && (r.setStorageSync("mtfxtuan_url", e.data.miniProgramPath), 
                                r.setStorageSync("mtfxtuan_h5", e.data.commonLink), r.setStorageSync("mtfxtuanqrcode2", e.data.miniProgramQrCode), 
                                r.navigateToMiniProgram({
                                    appId: "wxde8ac0a21135c07d",
                                    path: e.data.miniProgramPath
                                }), r.hideLoading()), 6 == t.appid_type && (r.setStorageSync("mtfxwm_url", e.data.miniProgramPath), 
                                r.setStorageSync("mtfxwm_h5", e.data.commonLink), r.setStorageSync("mtfxwmqrcode2", e.data.miniProgramQrCode), 
                                r.navigateToMiniProgram({
                                    appId: "wxde8ac0a21135c07d",
                                    path: e.data.miniProgramPath
                                }), r.hideLoading()), 7 == t.appid_type && (r.setStorageSync("mtfxsc_url", e.data.miniProgramPath), 
                                r.setStorageSync("mtfxsc_h5", e.data.commonLink), r.setStorageSync("mtfxscqrcode2", e.data.miniProgramQrCode), 
                                r.navigateToMiniProgram({
                                    appId: "wxde8ac0a21135c07d",
                                    path: e.data.miniProgramPath
                                }), r.hideLoading());
                            }
                        });
                    },
                    load_goods: function() {
                        var t = this, e = s.globalData.util.url("entry/wxapp/api", {
                            m: s.globalData.module_name,
                            o: "goods"
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid")
                            },
                            success: function(e) {
                                e = s.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), e = JSON.parse(e);
                                t.youlikes = e.data.items;
                            }
                        });
                    },
                    taped: function(e) {
                        r.getStorageSync("userinfo").nickname || 1 != r.getStorageSync("setting").login_type || !wx.getUserProfile ? (e = this.swiperItems[e], 
                        this.openad(e)) : this.showDialog2();
                    },
                    taped_banner: function(e) {
                        r.getStorageSync("userinfo").nickname || 1 != r.getStorageSync("setting").login_type || !wx.getUserProfile ? (e = this.ad_banner[e], 
                        this.openad(e)) : this.showDialog2();
                    },
                    loadtabbar: function() {
                        var t = this, e = s.globalData.util.url("entry/wxapp/api", {
                            m: s.globalData.module_name,
                            o: "tabbar"
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid")
                            },
                            success: function(e) {
                                e = s.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), e = JSON.parse(e);
                                t.tabBar = e.data.tabbar, r.setStorageSync("tabbar", t.tabBar);
                            }
                        });
                    },
                    loadWaimaiindex: function() {
                        var t = this, e = s.globalData.util.url("entry/wxapp/waimaiindex2", {
                            m: s.globalData.module_name
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                system_type: r.getStorageSync("systemtype")
                            },
                            success: function(e) {
                                t.swiperItems = e.data.lunbo, 1 == e.data.waimaidaohang.length ? t.waimaidaohang_1 = e.data.waimaidaohang[0] : 2 == e.data.waimaidaohang.length ? (t.waimaidaohang_1 = e.data.waimaidaohang[0], 
                                t.waimaidaohang_2 = e.data.waimaidaohang[1]) : 3 == e.data.waimaidaohang.length ? (t.waimaidaohang_1 = e.data.waimaidaohang[0], 
                                t.waimaidaohang_2 = e.data.waimaidaohang[1], t.waimaidaohang_3 = e.data.waimaidaohang[2]) : 4 == e.data.waimaidaohang.length && (t.waimaidaohang_1 = e.data.waimaidaohang[0], 
                                t.waimaidaohang_2 = e.data.waimaidaohang[1], t.waimaidaohang_3 = e.data.waimaidaohang[2], 
                                t.waimaidaohang_4 = e.data.waimaidaohang[3]), t.waimailist = e.data.waimailist, 
                                t.mall_nav = e.data.mall_nav, t.ad_banner = e.data.ad_banner, t.ad_banner_list = e.data.ad_banner_list, 
                                t.ad_banner_list2 = e.data.ad_banner_list2, 0 < e.data.ad_banner.length ? t.banner_color = e.data.ad_banner[0].banner_color : 0 < e.data.ad_banner_list.length ? t.banner_color = e.data.ad_banner_list[0].banner_color2 : 0 < e.data.ad_banner_list2.length && (t.banner_color = e.data.ad_banner_list2[0].banner_color2), 
                                t.sharetitle = e.data.sharetitle, t.sharepic = e.data.sharepic, t.waimaittnew_daohang_height = e.data.waimaittnew_daohang_height, 
                                r.stopPullDownRefresh();
                            }
                        });
                    },
                    loadMallgoodslist: function() {
                        var a, e;
                        "nomore" != this.loadStatus ? "youxuan" != (a = this).navType || 0 < r.getStorageSync("lat") && 0 < r.getStorageSync("lon") ? (a.loadStatus = "loading", 
                        e = s.globalData.util.url("entry/wxapp/mallgoodslist", {
                            m: s.globalData.module_name
                        }), r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                type: a.navType,
                                query: a.navQuery,
                                page: a.mallpage,
                                pagesize: a.mallpagesize,
                                lon: r.getStorageSync("lon"),
                                lat: r.getStorageSync("lat"),
                                system_type: r.getStorageSync("systemtype")
                            },
                            success: function(e) {
                                var t;
                                200 == e.data.code && (t = e.data.mallgoodslist, 1 == e.data.has_more ? a.loadStatus = "loadmore" : a.loadStatus = "nomore", 
                                a.mallpage = e.data.page, 1 == a.mallpage ? (a.mallpagesize = e.data.pagesize, a.mallgoodslist = [], 
                                a.mallgoodslist = t) : t && (a.mallgoodslist = a.mallgoodslist.concat(t)), a.mallpage++), 
                                r.hideLoading(), r.stopPullDownRefresh();
                            }
                        })) : a.getLocation() : r.hideLoading();
                    },
                    loadMallapigoodslist: function(t) {
                        this.loadStatus = "loading";
                        var e = s.globalData.util.url("entry/wxapp/mallapigoodslist", {
                            m: s.globalData.module_name
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                id: t.item_id,
                                lon: r.getStorageSync("lon"),
                                lat: r.getStorageSync("lat")
                            },
                            success: function(e) {
                                200 == e.data.code && (e.data.appid ? r.navigateToMiniProgram({
                                    appId: e.data.appid,
                                    path: e.data.path
                                }) : r.navigateTo({
                                    url: "../../pagesA/pages/mallA/huodong?id=" + t.item_id
                                })), r.hideLoading();
                            }
                        });
                    },
                    loadmovielist: function() {
                        var t = this, e = s.globalData.util.url("entry/wxapp/movielist3", {
                            m: s.globalData.module_name
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                index: 1,
                                cityid: t.cityid,
                                cityCode: t.cityCode
                            },
                            success: function(e) {
                                t.movietype = e.data.type, t.movielist = e.data.hot;
                            }
                        });
                    },
                    loadmoviecomelist: function() {
                        var t = this, e = s.globalData.util.url("entry/wxapp/moviecomelist3", {
                            m: s.globalData.module_name
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                index: 1,
                                cityid: t.cityid,
                                cityCode: t.cityCode
                            },
                            success: function(e) {
                                t.moviecometype = e.data.type, t.moviecomelist = e.data.come;
                            }
                        });
                    },
                    openShopad: function(e) {
                        r.getStorageSync("userinfo").nickname || 1 != r.getStorageSync("setting").login_type || !wx.getUserProfile ? (e = e.currentTarget.dataset, 
                        this.api_url = e.item_id, this.openad(e)) : this.showDialog2();
                    },
                    openad: function(a) {
                        var e, n = this;
                        1 == a.is_warm && a.tplid ? (e = s.globalData.util.url("entry/wxapp/subscribemessage2", {
                            m: s.globalData.module_name
                        }), r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                id: a.item_id,
                                type: 2
                            },
                            success: function(e) {
                                var t;
                                r.setStorageSync("subscribemessage" + a.item_id, e.data.warm_daynum), r.getStorageSync("subscribemessage" + a.item_id) < a.tplid_oneday_num ? (t = new Array(), 
                                t = a.tplid.split(","), wx.requestSubscribeMessage({
                                    tmplIds: t,
                                    success: function(e) {
                                        "reject" == e[t[0]] || (e = s.globalData.util.url("entry/wxapp/subscribemessage2", {
                                            m: s.globalData.module_name
                                        }), r.request({
                                            url: e,
                                            method: "POST",
                                            header: {
                                                "content-type": "application/x-www-form-urlencoded"
                                            },
                                            data: {
                                                openid: r.getStorageSync("openid"),
                                                id: a.item_id,
                                                type: 1
                                            },
                                            success: function(e) {
                                                r.setStorageSync("subscribemessage" + a.item_id, e.data.warm_daynum);
                                            }
                                        })), n.openad2(a);
                                    },
                                    fail: function(e) {
                                        e.openad2(a);
                                    }
                                })) : n.openad2(a);
                            }
                        })) : n.openad2(a);
                    },
                    openad2: function(t) {
                        r.showLoading({
                            title: "加载中...",
                            mask: !1
                        });
                        var e, a, n = this;
                        1 == t.adtype || 14 == t.adtype || 15 == t.adtype ? 0 < t.appid_type2 || 14 == t.adtype || 15 == t.adtype ? (e = s.globalData.util.url("entry/wxapp/index_jump", {
                            m: s.globalData.module_name
                        }), r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                adid: t.item_id
                            },
                            success: function(e) {
                                1 == e.data.jump_type ? r.navigateToMiniProgram({
                                    appId: e.data.jump_appid,
                                    path: e.data.jump_path
                                }) : 2 == e.data.jump_type ? (n.contact_type = "ad_new", n.contact_id = t.item_id, 
                                n.contact_title = e.data.title, n.contact_title_text = e.data.title_text, n.contact_title_desc = e.data.title_desc, 
                                n.contact_thumb = r.getStorageSync("setting").dianwo, n.showDialog3()) : r.showToast({
                                    title: e.data.msg,
                                    icon: "none"
                                }), r.hideLoading();
                            }
                        })) : (r.navigateToMiniProgram({
                            appId: t.appid,
                            path: t.path
                        }), r.hideLoading()) : 5 == t.adtype ? (r.navigateTo({
                            url: "../kefu/webview?return_url=" + encodeURIComponent(t.url) + "&t=" + Date.parse(new Date())
                        }), r.hideLoading()) : 10 == t.adtype ? (this.$refs.addmini.showAddMiniProgramTips = 1, 
                        r.hideLoading()) : 11 == t.adtype || 7 == t.adtype ? r.hideLoading() : 4 == t.adtype ? (r.setStorageSync("index_nav", t.url), 
                        -1 != t.url.indexOf("../index/") || -1 != t.url.indexOf("../meituangroup/") || -1 != t.url.indexOf("../user/") || -1 != t.url.indexOf("../movie/") || -1 != t.url.indexOf("../shop/") || -1 != t.url.indexOf("../kefu/") || -1 != t.url.indexOf("../meituan/") || -1 != t.url.indexOf("../elm/") || -1 != t.url.indexOf("../mall/") ? r.navigateTo({
                            url: t.url
                        }) : -1 != t.url.indexOf("../../../pages/index/") || -1 != t.url.indexOf("../../../pages/user/") || -1 != t.url.indexOf("../../../pages/kefu/") ? (a = t.url.replace("../../../pages/", "../"), 
                        r.navigateTo({
                            url: a
                        })) : -1 != t.url.indexOf("../../../pages/meituan/") || -1 != t.url.indexOf("../../../pages/elm/") || -1 != t.url.indexOf("../../../pages/eat/") ? (a = t.url.replace("../../../pages/", "../../pagesA/pages/"), 
                        r.navigateTo({
                            url: a
                        })) : -1 != t.url.indexOf("../../pagesA/pages/movie/") || -1 != t.url.indexOf("../../pagesA/pages/shop/") || -1 != t.url.indexOf("../../pagesA/pages/mallA/mallindex") ? (a = t.url.replace("../../pagesA/pages/", "../"), 
                        r.navigateTo({
                            url: a
                        })) : -1 == t.url.indexOf("../../pagesA/pages/movieA/") && -1 == t.url.indexOf("../../pagesA/pages/shopA/") && -1 == t.url.indexOf("../../pagesA/pages/meituan/") && -1 == t.url.indexOf("../../pagesA/pages/elm/") && -1 == t.url.indexOf("../../pagesA/pages/eat/") && -1 == t.url.indexOf("../../pagesA/pages/userA/") && (-1 != t.url.indexOf("../meituan/") || -1 != t.url.indexOf("../elm/") || -1 != t.url.indexOf("../eat/")) ? (a = t.url.replace("../", "../../pagesA/pages/"), 
                        r.navigateTo({
                            url: a
                        })) : r.navigateTo({
                            url: t.url
                        }), r.hideLoading(), r.hideLoading()) : 2 == t.adtype || 3 == t.adtype || 9 == t.adtype ? (e = s.globalData.util.url("entry/wxapp/api", {
                            m: s.globalData.module_name,
                            o: "ad_kefubind"
                        }), r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                adtype: "ad_new",
                                adid: t.item_id,
                                openid: r.getStorageSync("openid")
                            },
                            success: function(e) {}
                        }), this.contact_title_desc = "", this.contact_type = "ad_new", this.contact_id = t.item_id, 
                        this.contact_title = t.title, this.contact_title_text = t.title_text, this.contact_title_desc = t.title_desc, 
                        this.contact_thumb = r.getStorageSync("setting").dianwo, r.hideLoading(), this.showDialog3()) : 8 == t.adtype ? 1 == t.mall_adtype ? r.navigateTo({
                            url: "../../pagesA/pages/mallA/huodong?id=" + t.item_id
                        }) : 2 == t.mall_adtype && this.loadMallapigoodslist(t) : 12 == t.adtype ? (r.previewImage({
                            urls: [ t.open_thumb ]
                        }), r.hideLoading()) : 13 == t.adtype && this.getCoupon(t);
                    },
                    getCoupon: function(t) {
                        var a = this;
                        if (r.getStorageSync("path" + t.item_id)) return r.getStorageSync("appid" + t.item_id) ? r.navigateToMiniProgram({
                            appId: r.getStorageSync("appid" + t.item_id),
                            path: r.getStorageSync("path" + t.item_id)
                        }) : r.setClipboardData({
                            data: r.getStorageSync("path" + t.item_id),
                            success: function(e) {
                                r.showToast({
                                    title: a.setting.mall_tkl_text || "内容已复制",
                                    icon: "none"
                                });
                            }
                        }), void r.hideLoading();
                        var e = s.globalData.util.url("entry/wxapp/mall_goods_getcoupon", {
                            m: s.globalData.module_name
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                goodsid: t.goodsid,
                                pingtai: t.mall_type,
                                goodssign: t.goodssign,
                                search_id: a.search_id,
                                quan_url: t.quan_url,
                                uid: a.uid,
                                id: t.item_id
                            },
                            success: function(e) {
                                200 == e.data.code && ("tb" == t.mall_type ? (a.path = e.data.tkl, r.setStorageSync("path" + t.item_id, e.data.tkl), 
                                r.setStorageSync("pid_time", e.data.pid_time), r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && r.setStorageSync("pid_use_time", r.getStorageSync("pid_time")), 
                                r.setClipboardData({
                                    data: e.data.tkl,
                                    success: function(e) {
                                        r.showToast({
                                            title: a.setting.mall_tkl_text || "内容已复制",
                                            icon: "none"
                                        });
                                    }
                                })) : (a.appid = e.data.appid, a.path = e.data.path, r.setStorageSync("appid" + t.item_id, e.data.appid), 
                                r.setStorageSync("path" + t.item_id, e.data.path), r.navigateToMiniProgram({
                                    appId: e.data.appid,
                                    path: e.data.path
                                })), r.hideLoading());
                            }
                        });
                    },
                    taobaoauth: function() {
                        var t = this;
                        r.setClipboardData({
                            data: this.qudao_tkl,
                            success: function(e) {
                                r.showToast({
                                    title: "复制成功，请打开淘宝授权",
                                    icon: "none"
                                }), t.is_qudao_tkl = 1, r.hideLoading();
                            }
                        });
                    },
                    retaobaoauth: function() {
                        this.is_qudao_tkl = 0, this.qudao_tkl = "", this.gettaobaoauth();
                    },
                    notaobaoauth: function() {
                        3 == this.appid_type && r.navigateToMiniProgram({
                            appId: "wxece3a9a4c82f58c9",
                            path: r.getStorageSync("setting").default_elmwmpath
                        }), 4 == this.appid_type && r.navigateToMiniProgram({
                            appId: "wxece3a9a4c82f58c9",
                            path: r.getStorageSync("setting").default_elmscpath
                        });
                    },
                    openProductInfo: function(e) {
                        r.navigateTo({
                            url: "../../pagesA/pages/shopA/detail?item_id=" + e.currentTarget.dataset.productid
                        });
                    },
                    openMovieInfo: function(e) {
                        r.setStorageSync("cityname", ""), r.setStorageSync("cityid", ""), r.getStorageSync("userinfo").nickname || 1 != r.getStorageSync("setting").login_type || !wx.getUserProfile ? (e = e, 
                        r.setStorageSync("moviedetail", e.currentTarget.dataset.movie), 1 == e.currentTarget.dataset.movietype ? r.navigateTo({
                            url: "../../pagesA/pages/movieA/detail?filmid=" + e.currentTarget.dataset.movie.showId
                        }) : r.navigateTo({
                            url: "../../pagesA/pages/movieA/detail2?filmid=" + e.currentTarget.dataset.movie.filmId
                        })) : this.showDialog2();
                    },
                    getLocation: function() {
                        var a = this;
                        r.getLocation({
                            type: "wgs84",
                            success: function(e) {
                                var t = s.globalData.util.url("entry/wxapp/address", {
                                    m: s.globalData.module_name
                                });
                                r.setStorageSync("lon", e.longitude), r.setStorageSync("lat", e.latitude), r.request({
                                    url: t,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: {
                                        lon: e.longitude,
                                        lat: e.latitude
                                    },
                                    success: function(e) {
                                        r.setStorageSync("cityCode", e.data.data.cityCode), r.setStorageSync("city", e.data.data.city), 
                                        r.setStorageSync("cityid", e.data.data.ci), 0 < e.data.data.ci && 0 < r.getStorageSync("lat") ? a.loadMallgoodslist() : r.showModal({
                                            title: "系统提示",
                                            content: "请授权获取您的位置信息",
                                            showCancel: !0,
                                            success: function(e) {
                                                e.confirm && a.again_getLocation(), a.mallgoodslist = [], a.loadStatus = "nomore", 
                                                r.setStorageSync("lon", ""), r.setStorageSync("lat", ""), r.setStorageSync("cityCode", ""), 
                                                r.setStorageSync("city", ""), r.setStorageSync("cityid", ""), r.hideLoading();
                                            }
                                        });
                                    }
                                });
                            },
                            fail: function(e) {
                                a.mallgoodslist = [], a.loadStatus = "nomore", r.setStorageSync("lon", ""), r.setStorageSync("lat", ""), 
                                r.setStorageSync("cityCode", ""), r.setStorageSync("city", ""), r.setStorageSync("cityid", ""), 
                                r.hideLoading();
                            }
                        });
                    },
                    again_getLocation: function() {
                        var t = this;
                        r.getSetting({
                            success: function(e) {
                                null != e.authSetting["scope.userLocation"] && 1 != e.authSetting["scope.userLocation"] ? r.showModal({
                                    title: "是否授权当前位置",
                                    content: "需要获取您的地理位置，请确认授权，否则无法获取您所需数据",
                                    success: function(e) {
                                        e.cancel ? r.showToast({
                                            title: "授权失败",
                                            icon: "success",
                                            duration: 1e3
                                        }) : e.confirm && r.openSetting({
                                            success: function(e) {
                                                1 == e.authSetting["scope.userLocation"] ? (r.showToast({
                                                    title: "授权成功",
                                                    icon: "success",
                                                    duration: 1e3
                                                }), t.getLocation(t)) : r.showToast({
                                                    title: "授权失败",
                                                    icon: "success",
                                                    duration: 1e3
                                                });
                                            }
                                        });
                                    }
                                }) : (e.authSetting["scope.userLocation"], t.getLocation(t));
                            }
                        });
                    },
                    taobaoauth_done: function() {
                        var a = this, e = s.globalData.util.url("entry/wxapp/api", {
                            m: s.globalData.module_name,
                            o: "taobaoauth_done"
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                appid_type: a.appid_type
                            },
                            success: function(e) {
                                var t;
                                0 != e.data.status ? (t = s.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), 
                                t = JSON.parse(t), 1 == e.data.status ? (3 == a.appid_type && (r.setStorageSync("elmwm_url", t.elmwm_url), 
                                r.setStorageSync("elmwmqrcode", t.elmwm_qrcode), r.setStorageSync("elmwm_h5", t.elmwm_h5), 
                                r.setStorageSync("pid_time", +t.pid_time), r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && r.setStorageSync("pid_use_time", r.getStorageSync("pid_time")), 
                                r.setStorageSync("is_qudao", t.is_qudao), a.closeDialog1(), r.navigateToMiniProgram({
                                    appId: "wxece3a9a4c82f58c9",
                                    path: t.elmwm_url
                                })), 4 == a.appid_type && (r.setStorageSync("elmsc_url", t.elmsc_url), r.setStorageSync("elmscqrcode", t.elmsc_qrcode), 
                                r.setStorageSync("elmsc_h5", t.elmsc_h5), r.setStorageSync("pid_time", +t.pid_time), 
                                r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && r.setStorageSync("pid_use_time", r.getStorageSync("pid_time")), 
                                r.setStorageSync("is_qudao", t.is_qudao), a.closeDialog1(), r.navigateToMiniProgram({
                                    appId: "wxece3a9a4c82f58c9",
                                    path: t.elmsc_url
                                }))) : r.showModal({
                                    title: "提示",
                                    content: "未获取到您的授权信息，请重试！",
                                    showCancel: !1,
                                    success: function(e) {
                                        e.confirm || e.cancel;
                                    }
                                })) : r.showModal({
                                    title: "提示",
                                    content: "未获取到您的授权信息，请重试！",
                                    showCancel: !1,
                                    success: function(e) {
                                        e.confirm || e.cancel;
                                    }
                                });
                            }
                        });
                    },
                    gettaobaoauth: function() {
                        var t = this, a = this, e = s.globalData.util.url("entry/wxapp/api", {
                            m: s.globalData.module_name,
                            o: "gettaobaoauth"
                        });
                        r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                appid_type: a.appid_type
                            },
                            success: function(e) {
                                1 == e.data.status ? (a.showDialog1(), r.hideLoading(), a.qudao_tkl = e.data.data) : 0 == e.data.status ? (r.hideLoading(), 
                                r.showToast({
                                    title: "获取授权信息出错",
                                    icon: "none"
                                })) : 2 == e.data.status && (e = s.globalData.crypt.Decrypt(e.data.data.data, e.data.data.key), 
                                e = JSON.parse(e), console.log("gettaobaoauth:" + e), 3 == t.appid_type && (r.setStorageSync("elmwm_url", e.elmwm_url), 
                                r.setStorageSync("elmwmqrcode", e.elmwm_qrcode), r.setStorageSync("elmwm_h5", e.elmwm_h5), 
                                r.setStorageSync("pid_time", +e.pid_time), r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && r.setStorageSync("pid_use_time", r.getStorageSync("pid_time")), 
                                r.setStorageSync("is_qudao", e.is_qudao), r.navigateToMiniProgram({
                                    appId: "wxece3a9a4c82f58c9",
                                    path: e.elmwm_url
                                }), r.hideLoading()), 4 == t.appid_type && (r.setStorageSync("elmsc_url", e.elmsc_url), 
                                r.setStorageSync("elmscqrcode", e.elmsc_qrcode), r.setStorageSync("elmsc_h5", e.elmsc_h5), 
                                r.setStorageSync("pid_time", +e.pid_time), r.getStorageSync("pid_time") != r.getStorageSync("pid_use_time") && r.setStorageSync("pid_use_time", r.getStorageSync("pid_time")), 
                                r.setStorageSync("is_qudao", e.is_qudao), r.navigateToMiniProgram({
                                    appId: "wxece3a9a4c82f58c9",
                                    path: e.elmsc_url
                                }), r.hideLoading()));
                            }
                        });
                    },
                    closeContact: function() {
                        this.closeDialog3();
                    },
                    addmini: function() {
                        this.$refs.addmini.showAddMiniProgramTips = 1;
                    },
                    autoUpdate: function() {
                        var t = r.getUpdateManager();
                        t.onCheckForUpdate(), t.onUpdateReady(function() {
                            r.showModal({
                                title: "更新提示",
                                content: "新版本已经准备好，是否重启应用？",
                                success: function(e) {
                                    e.confirm && t.applyUpdate();
                                }
                            });
                        });
                    },
                    changCate: function(e) {
                        var t, a = e.currentTarget.dataset.cateid, n = e.currentTarget.dataset.maincateid, i = this.mainCate;
                        for (t in this.mainCate) i[t].hidden = t == n ? 0 : 1;
                        this.productListTo = "", this.currentCateIndex = a, this.mainCate = i, this.kwd = "", 
                        this.allProducts_temp = [], this.rscroll();
                    },
                    more: function(e) {
                        r.navigateTo({
                            url: "../shop/index"
                        });
                    },
                    movie: function(e) {
                        r.getStorageSync("userinfo").nickname || 1 != r.getStorageSync("setting").login_type || !wx.getUserProfile ? r.navigateTo({
                            url: "../movie/index"
                        }) : this.showDialog2();
                    },
                    rscroll: function() {
                        var e = this;
                        null != this.scrollTimer && clearTimeout(this.scrollTimer), this.scrollTimer = setTimeout(function() {
                            e.getIndex();
                        }, 100);
                    },
                    onShareTimeline: function() {
                        var e = "uid=" + r.getStorageSync("userinfo").user_id;
                        return {
                            title: r.getStorageSync("setting").sharetitle,
                            imageUrl: r.getStorageSync("setting").sharethumb,
                            query: e
                        };
                    }
                }
            };
            i.default = n;
        }).call(this, l("543d").default);
    }
}, [ [ "b628", "common/runtime", "common/vendor" ] ] ]);